package com.gezi.admin.module.sys.dict.data;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gezi.admin.module.sys.dict.data.model.AppDictDataAddParamModel;
import com.gezi.admin.module.config.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @Author 格子软件
 * @createDate 2024/2/10 09:00
 * @contact 公众号：格子软件 微信：13716343106 邮箱：1424529270@qq.com
 */
@Data
@TableName("sys_dict_data")
public class AppDictDataEntity extends BaseEntity {

  @ApiModelProperty(value = "字典id")
  @TableField(value = "dict_id")
  private String dictId;

  @ApiModelProperty(value = "标识")
  @TableField(value = "type")
  private String type;

  @ApiModelProperty(value = "标识名称")
  @TableField(value = "name")
  private String name;

  @ApiModelProperty(value = "是否默认")
  @TableField(value = "is_default")
  private Boolean isDefault;

  @ApiModelProperty(value = "排序")
  @TableField(value = "sort")
  private Integer sort;

  @ApiModelProperty(value = "表格回显样式")
  @TableField(value = "list_class")
  private String listClass;

  public void setData(AppDictDataAddParamModel paramModel){
    this.dictId = paramModel.getDictId();
    this.type = paramModel.getType();
    this.name = paramModel.getName();
    this.isDefault = paramModel.getIsDefault();
    this.sort = paramModel.getSort();
    this.listClass = paramModel.getListClass();
  }
}